using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace MIMPWinForms
{
    using XnaColor = Microsoft.Xna.Framework.Graphics.Color;
    using SysColor = System.Drawing.Color;

    /// <summary>
    /// Defines constants used by the MIMPWinForms application.
    /// </summary>
    public static class Constants
    {
        private static string ROOT_DIR = System.Windows.Forms.Application.StartupPath + "\\";

        public static string MONSTER_XML_DIRECTORY = ROOT_DIR + "MonsterDefinitions\\";
        public static string MONSTER_ICON_DIRECTORY = "Sprites\\Monsters\\";
        public static string MAPS_DIRECTORY = ROOT_DIR + "Maps\\";

        public static string CONTENT_CONTROL_POINT_ICON = "Sprites\\Main Screen\\flag";
        public static string CONTENT_HEXAGON = "Sprites\\Main Screen\\hexagon";
        public static string CONTENT_HEXAGON_SHADOW = "Sprites\\Main Screen\\hexagon-shadow";
        public static string CONTENT_HEXAGON_OUTLINE = "Sprites\\Main Screen\\hexagon-outline";
        public static string CONTENT_BACKGROUND = "Sprites\\Main Screen\\gamescreen-background";
        public static string CONTENT_BLANK = "Sprites\\Main Screen\\blank";
        public static string CONTENT_DEFAULT_MONSTER = MONSTER_ICON_DIRECTORY + "Default";

        public static XnaColor[] PLAYER_COLORS = { XnaColor.Red, XnaColor.Blue, XnaColor.Orange, 
            XnaColor.LimeGreen, XnaColor.Purple, XnaColor.Yellow, XnaColor.Cyan, XnaColor.Sienna };

        public static XnaColor COLOR_SELECTED = XnaColor.Silver;
        public static XnaColor COLOR_ATTACKER = XnaColor.LightSteelBlue;
        public static XnaColor COLOR_TARGET = XnaColor.Gold;
        public static XnaColor COLOR_DEFENDER = XnaColor.DarkGoldenrod;

        public enum ChatModes { Yell, Say, Whisper }

        /// <summary>
        /// Converts a Microsoft.Xna.Framework.Graphics.Color to a System.Drawing.Color.
        /// </summary>
        /// <param name="color">The Xna Color to convert.</param>
        /// <returns>The same color as a System.Drawing.Color.</returns>
        public static SysColor XnaColorToSysColor(XnaColor color) {
            return System.Drawing.Color.FromArgb(color.A, color.R, color.G, color.B);
        }

        /// <summary>
        /// Converts a System.Drawing.Color to a Microsoft.Xna.Framework.Graphics.Color.
        /// </summary>
        /// <param name="color">The System.Drawing.Color to convert.</param>
        /// <returns>The same color as an Xna Color.</returns>
        public static XnaColor SysColorToXnaColor(SysColor color) {
            return new XnaColor(color.R, color.G, color.B, color.A);
        }
    }
}
